#include <iostream>
#include <vector>
#include <map>
#include <string>
#include <exception>

using namespace std;

typedef struct TTerm {
	int type;
	string value;
	vector<TTerm> parts;
} TTerm;

TTerm match_addop(string& line);
TTerm match_assignment(string& line);
TTerm match_digit(string& line);
TTerm match_digits(string& line);
TTerm match_expression(string& line);
TTerm match_factor(string& line);
TTerm match_letter(string& line);
TTerm match_letterdigits(string& line);
TTerm match_line(string& line);
TTerm match_mulop(string& line);
TTerm match_multiple_lines(string& line);
TTerm match_myfile(string& line);
TTerm match_number(string& line);
TTerm match_print(string& line);
TTerm match_reset(string& line);
TTerm match_term(string& line);
TTerm match_var(string& line);
